package com.cmfi.domain;

import java.util.Objects;

import lombok.Data;

/**
 * 设备
 */
@Data
public class Equipment {

	private Long id;
    private String equipmentName;//设备名称
    private Long status;//设备状态 0已关机，1正常运行，2故障
    private long lineId;//所属产线id
    private String lineName;//所属产线名称
    private long uptime;//设备开机时间
    private long shutdownTime;//设备关机时间
    
    public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	public String getEquipmentName() {
		return equipmentName;
	}

	public void setEquipmentName(String equipmentName) {
		this.equipmentName = equipmentName;
	}

	public Long getStatus() {
		return status;
	}

	public void setStatus(Long status) {
		this.status = status;
	}

	public long getLineId() {
		return lineId;
	}

	public void setLineId(long lineId) {
		this.lineId = lineId;
	}

	public String getLineName() {
		return lineName;
	}

	public void setLineName(String lineName) {
		this.lineName = lineName;
	}

	public long getUptime() {
		return uptime;
	}

	public void setUptime(long uptime) {
		this.uptime = uptime;
	}

	public long getShutdownTime() {
		return shutdownTime;
	}
	public void setShutdownTime(long shutdownTime) {
		this.shutdownTime = shutdownTime;
	}
	@Override
	public String toString() {
		return "Equipment [equipmentName=" + equipmentName + ", status=" + status + ", uptime=" + uptime
				+ ", shutdownTime=" + shutdownTime + "]";
	}
	
	@Override
	public int hashCode() {
		return Objects.hash(equipmentName, shutdownTime, status, uptime);
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Equipment other = (Equipment) obj;
		return Objects.equals(equipmentName, other.equipmentName) && Objects.equals(shutdownTime, other.shutdownTime)
				&& Objects.equals(status, other.status) && Objects.equals(uptime, other.uptime);
	}
    
}
